package cn.shutdown.dao;

import cn.shutdown.po.Post;
import cn.shutdown.po.User;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Map;

@Repository
public interface IPostDao {
    int deleteByPrimaryKey(Integer id);

    int insert(Post record);

    int insertSelective(Post record);

    Post selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(Post record);

    /**
     *
     * @param categoryId
     * @return
     */
    List<Map<String, Object>> selectByCategoryId(int categoryId);
    List<Map<String, Object>> selectByCategoryIdNoLimit(int categoryId);

    Map<String, Object> selectById(int id);

    int selectMaxLevel(int id);

    List<Map<String,Object>> selectSubPost(int id);
}